diff options
| author | 0-Zz-ang <s1998319@gmail.com> | 2025-08-25 09:23:30 +0900 |
|---|---|---|
| committer | 0-Zz-ang <s1998319@gmail.com> | 2025-08-25 09:23:30 +0900 |
| commit | b12a06766e32e3c76544b1d12bec91653e1fe9db (patch) | |
| tree | 57ca1ddff3342677d132e07b78fc03873a960255 /app/[lng]/evcp/(evcp)/docu-list-rule/[projectId]/document-class | |
| parent | d38877eef87917087a4a217bea32ae84d6738a7d (diff) | |
docu-list-rule페이지 수정
Diffstat (limited to 'app/[lng]/evcp/(evcp)/docu-list-rule/[projectId]/document-class')
| -rw-r--r-- | app/[lng]/evcp/(evcp)/docu-list-rule/[projectId]/document-class/page.tsx | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/app/[lng]/evcp/(evcp)/docu-list-rule/[projectId]/document-class/page.tsx b/app/[lng]/evcp/(evcp)/docu-list-rule/[projectId]/document-class/page.tsx new file mode 100644 index 00000000..8a0f1bd7 --- /dev/null +++ b/app/[lng]/evcp/(evcp)/docu-list-rule/[projectId]/document-class/page.tsx @@ -0,0 +1,49 @@ +import * as React from "react"; +import { Skeleton } from "@/components/ui/skeleton"; +import { DataTableSkeleton } from "@/components/data-table/data-table-skeleton"; +import { getDocumentClassCodeGroups } from "@/lib/docu-list-rule/document-class/service"; +import { DocumentClassTable } from "@/lib/docu-list-rule/document-class/table/document-class-table"; + +import { searchParamsDocumentClassCache } from "@/lib/docu-list-rule/document-class/validation"; + +interface IndexPageProps { + searchParams: Promise<any>; + params: Promise<{ lng: string; projectId: string }>; +} + +export default async function IndexPage(props: IndexPageProps) { + const searchParams = await props.searchParams; + const { projectId } = await props.params; + + // 프로젝트 ID를 필터에 추가 + const searchParamsWithProject = { + ...searchParams, + projectId: projectId + }; + + const promises = Promise.all([ + getDocumentClassCodeGroups( + searchParamsDocumentClassCache.parse(searchParamsWithProject) + ), + ]); + + return ( + <> + + <React.Suspense fallback={<Skeleton className="h-7 w-52" />}></React.Suspense> + <React.Suspense + fallback={ + <DataTableSkeleton + columnCount={4} + searchableColumnCount={1} + filterableColumnCount={1} + cellWidths={["10rem", "20rem", "10rem", "8rem"]} + shrinkZero + /> + } + > + <DocumentClassTable promises={promises} /> + </React.Suspense> + </> + ); +} |
